# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 68
n 68(None)[return ret
]:
	i: 51(), 67()
	o: 

nname: 67
n 67(None)[]:
	i: 0(f)
	o: 68()

nname: 51
n 51(None)[louie_send('event_down', sender=self.player)
]:
	i: 24&40(t), 47()
	o: 68()

nname: 47
n 47(None)[]:
	i: 24&40(f)
	o: 51()

nname: 24&40
n 24&40(val < 0 and 'event_up')[]:
	i: 0(t)
	o: 47(f), 51(t)

nname: 0
n 0(ret)[ret = self.player.select(val)
]:
	i: 
	o: 24&40(t), 67(f)

nname: 68
n 68(None)[return ret
]:
	i: 24&40(), 0(f)
	o: 

nname: 24&40
n 24&40(None)[if not(val < 0 and 'event_up'):
	pass
louie_send('event_down', sender=self.player)
]:
	i: 0(t)
	o: 68()

nname: 0
n 0(ret)[ret = self.player.select(val)
]:
	i: 
	o: 24&40(t), 68(f)

nname: 0
n 0(None)[ret = self.player.select(val)
if ret:
	if not(val < 0 and 'event_up'):
		pass
	louie_send('event_down', sender=self.player)
return ret
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4ecc>}
nname: 0
n 0(None)[return False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4aec>}
nname: 0
n 0(None)[return False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4b4c>}
nname: 0
n 0(None)[return False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4b0c>}
nname: 0
n 0(None)[return False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4a8c>}
nname: 0
n 0(None)[pygui_globs['menustack'].toggle()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4c6c>}
nname: 0
n 0(None)[self.player.move_to_page()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4b4c>}
nname: 6
n 6(None)[def _move(self, val):
	ret = self.player.select(val)
	if ret:
		if not(val < 0 and 'event_up'):
			pass
		louie_send('event_down', sender=self.player)
	return ret

def event_left(self, event):
	return False

def event_right(self, event):
	return False

def event_up(self, event):
	return False

def event_down(self, event):
	return False

def event_toggle_menu(self, event):
	pygui_globs['menustack'].toggle()
	return True

def event_select(self, event):
	self.player.move_to_page()
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb76b486c>}
nname: 0
n 0(None)[self._move(-event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4bcc>}
nname: 0
n 0(None)[self._move(event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4acc>}
nname: 0
n 0(None)[self.player.move_to_page()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4b8c>}
nname: 6
n 6(None)[def event_left(self, event):
	self._move(-event.arg['count'])
	return True

def event_right(self, event):
	self._move(event.arg['count'])
	return True

def event_down(self, event):
	self.player.move_to_page()
	return True

event_up = event_down
event_wheel_rwd = event_left
event_wheel_fwd = event_right
]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb76b482c>}
nname: 0
n 0(None)[self._move(event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4a2c>}
nname: 0
n 0(None)[self._move(-event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4bcc>}
nname: 0
n 0(None)[self.player.move_to_page()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76b4b0c>}
nname: 6
n 6(None)[def event_down(self, event):
	self._move(event.arg['count'])
	return True

def event_up(self, event):
	self._move(-event.arg['count'])
	return True

def event_left(self, event):
	self.player.move_to_page()
	return True

event_right = event_left
]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb76b48ac>}
nname: 0
n 0(None)[from __future__ import absolute_import
from .. import EventDispatcher
from . import MenuEventHandler
from pygui.shared import pygui_globs
from peewee.messages import send as louie_send
class NotebookMenuEventhandler(EventDispatcher):
	def _move(self, val):
		ret = self.player.select(val)
		if ret:
			if not(val < 0 and 'event_up'):
				pass
			louie_send('event_down', sender=self.player)
		return ret

	def event_left(self, event):
		return False

	def event_right(self, event):
		return False

	def event_up(self, event):
		return False

	def event_down(self, event):
		return False

	def event_toggle_menu(self, event):
		pygui_globs['menustack'].toggle()
		return True

	def event_select(self, event):
		self.player.move_to_page()
		return True



class HorizontalNotebookMenuEventHandler(NotebookMenuEventhandler):
	def event_left(self, event):
		self._move(-event.arg['count'])
		return True

	def event_right(self, event):
		self._move(event.arg['count'])
		return True

	def event_down(self, event):
		self.player.move_to_page()
		return True

	event_up = event_down
	event_wheel_rwd = event_left
	event_wheel_fwd = event_right


class VerticalNotebookMenuEventHandler(NotebookMenuEventhandler):
	def event_down(self, event):
		self._move(event.arg['count'])
		return True

	def event_up(self, event):
		self._move(-event.arg['count'])
		return True

	def event_left(self, event):
		self.player.move_to_page()
		return True

	event_right = event_left


]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76ac98c>}
from __future__ import absolute_import
from .. import EventDispatcher
from . import MenuEventHandler
from pygui.shared import pygui_globs
from peewee.messages import send as louie_send
class NotebookMenuEventhandler(EventDispatcher):
	def _move(self, val):
		ret = self.player.select(val)
		if ret:
			if not(val < 0 and 'event_up'):
				pass
			louie_send('event_down', sender=self.player)
		return ret

	def event_left(self, event):
		return False

	def event_right(self, event):
		return False

	def event_up(self, event):
		return False

	def event_down(self, event):
		return False

	def event_toggle_menu(self, event):
		pygui_globs['menustack'].toggle()
		return True

	def event_select(self, event):
		self.player.move_to_page()
		return True



class HorizontalNotebookMenuEventHandler(NotebookMenuEventhandler):
	def event_left(self, event):
		self._move(-event.arg['count'])
		return True

	def event_right(self, event):
		self._move(event.arg['count'])
		return True

	def event_down(self, event):
		self.player.move_to_page()
		return True

	event_up = event_down
	event_wheel_rwd = event_left
	event_wheel_fwd = event_right


class VerticalNotebookMenuEventHandler(NotebookMenuEventhandler):
	def event_down(self, event):
		self._move(event.arg['count'])
		return True

	def event_up(self, event):
		self._move(-event.arg['count'])
		return True

	def event_left(self, event):
		self.player.move_to_page()
		return True

	event_right = event_left


